package com.ruoyi.system.service.report.Impl;

import java.util.List;

import com.ruoyi.system.domain.report.Survey;
import com.ruoyi.system.mapper.report.SurveyMapper;
import com.ruoyi.system.service.report.ISurveyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 随访记录Service业务层处理
 *
 * @author jiadun
 * @date 2021-12-30
 */
@Service
public class SurveyServiceImpl implements ISurveyService
{
    @Autowired
    private SurveyMapper surveyMapper;

    /**
     * 查询随访记录
     *
     * @param patientid 随访记录主键
     * @return 随访记录
     */
    @Override
    public Survey selectSurveyByPatientid(Long patientid)
    {
        return surveyMapper.selectSurveyByPatientid(patientid);
    }

    /**
     * 查询随访记录列表
     *
     * @param survey 随访记录
     * @return 随访记录
     */
    @Override
    public List<Survey> selectSurveyList(Survey survey)
    {
        return surveyMapper.selectSurveyList(survey);
    }

    /**
     * 新增随访记录
     *
     * @param survey 随访记录
     * @return 结果
     */
    @Override
    public int insertSurvey(Survey survey)
    {
        return surveyMapper.insertSurvey(survey);
    }

    /**
     * 修改随访记录
     *
     * @param survey 随访记录
     * @return 结果
     */
    @Override
    public int updateSurvey(Survey survey)
    {
        return surveyMapper.updateSurvey(survey);
    }

    /**
     * 批量删除随访记录
     *
     * @param patientids 需要删除的随访记录主键
     * @return 结果
     */
    @Override
    public int deleteSurveyByPatientids(Long[] patientids)
    {
        return surveyMapper.deleteSurveyByPatientids(patientids);
    }

    /**
     * 删除随访记录信息
     *
     * @param patientid 随访记录主键
     * @return 结果
     */
    @Override
    public int deleteSurveyByPatientid(Long patientid)
    {
        return surveyMapper.deleteSurveyByPatientid(patientid);
    }
}
